﻿#define _CRT_SECURE_NO_WARNINGS
﻿void main()

{

    stack<char> S;

    char x, y;

    x = 'n'; y = 'g';

    S.push(x);
    S.push('i'); 
   
    S.push('r');
    S.push('t'); 
   
    S.push('s');

    while (!S.empty())

    {

        x = S.top();

        S.pop();

        cout << x;

    };

    cout << y;

}

